<?php
include_once('common/header.php');	
if(!isset($_SERVER['HTTP_REFERER'])) {	
	$arrJson = array('error'=>1,'msg'=>$arrError[1]);
	echo $objRequest->getParam('callback') . '(' . Zend_Json::encode($arrJson) . ')';
	exit();
}
$intUserId		= Vfriend_Function::base64D($objRequest->getParam('uid',''));

$intProductId	= $objRequest->getParam('productid',0);
$intTotal		= 0;
$objProduct		= new Product();
$arrResult		= $objProduct->getAllForProduct($intUserId, $intProductId);
$arrProduct		= $objProduct->get($intProductId);

$this->view->strToken 		= $AppUI->id . '_' . $intProductId;
$this->view->intOwnerId 	= $intUserId;
$this->view->intProductId 	= $intProductId;
$this->view->objProduct 	= $arrProduct;
$this->view->arrResult 		= $arrResult;
$this->view->intTotal 		= count($arrResult);
$objView 		= Zend_Registry::get('objView');
$strData		= $objView->fetch('ajax/ui-fortune.tpl');
$arrJson 		= array('error'=>0,'msg'=>$strData);
echo $objRequest->getParam('callback') . '(' . Zend_Json::encode($arrJson) . ')';
exit();
?>